Integrand size = 29, antiderivative size = 84 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {1}{2} (A b+a B) x+\frac {(2 a A+3 b B) \sin (c+d x)}{3 d}+\frac {(A b+a B) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4081, 3872, 2715, 8, 2717} \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {(2 a A+3 b B) \sin (c+d x)}{3 d}+\frac {(a B+A b) \sin (c+d x) \cos (c+d x)}{2 d}+\frac {1}{2} x (a B+A b)+\frac {a A \sin (c+d x) \cos ^2(c+d x)}{3 d} \]
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 3872
Rule 4081
Rubi steps \begin{align*} \text {integral}& = \frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) (-3 (A b+a B)-(2 a A+3 b B) \sec (c+d x)) \, dx \\ & = \frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}-(-A b-a B) \int \cos ^2(c+d x) \, dx-\frac {1}{3} (-2 a A-3 b B) \int \cos (c+d x) \, dx \\ & = \frac {(2 a A+3 b B) \sin (c+d x)}{3 d}+\frac {(A b+a B) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{2} (-A b-a B) \int 1 \, dx \\ & = \frac {1}{2} (A b+a B) x+\frac {(2 a A+3 b B) \sin (c+d x)}{3 d}+\frac {(A b+a B) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a A \cos ^2(c+d x) \sin (c+d x)}{3 d} \\ \end{align*}
Time = 0.11 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.89 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {6 A b c+6 a B c+6 A b d x+6 a B d x+3 (3 a A+4 b B) \sin (c+d x)+3 (A b+a B) \sin (2 (c+d x))+a A \sin (3 (c+d x))}{12 d} \]
[In]
[Out]
Time = 1.74 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.77
method | result | size |
parallelrisch | \(\frac {3 \left (A b +B a \right ) \sin \left (2 d x +2 c \right )+a A \sin \left (3 d x +3 c \right )+3 \left (3 a A +4 B b \right ) \sin \left (d x +c \right )+6 \left (A b +B a \right ) x d}{12 d}\) | \(65\) |
derivativedivides | \(\frac {\frac {a A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+A b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \sin \left (d x +c \right ) b}{d}\) | \(85\) |
default | \(\frac {\frac {a A \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+A b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B a \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \sin \left (d x +c \right ) b}{d}\) | \(85\) |
risch | \(\frac {A b x}{2}+\frac {B a x}{2}+\frac {3 a A \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (d x +c \right ) B b}{d}+\frac {a A \sin \left (3 d x +3 c \right )}{12 d}+\frac {\sin \left (2 d x +2 c \right ) A b}{4 d}+\frac {\sin \left (2 d x +2 c \right ) B a}{4 d}\) | \(85\) |
norman | \(\frac {\left (-\frac {A b}{2}-\frac {B a}{2}\right ) x +\left (\frac {A b}{2}+\frac {B a}{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (-A b -B a \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (A b +B a \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (2 a A -A b -B a +2 B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {\left (2 a A -3 A b -3 B a -6 B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}-\frac {\left (2 a A +A b +B a +2 B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (2 a A +3 A b +3 B a -6 B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\) | \(235\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.71 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (B a + A b\right )} d x + {\left (2 \, A a \cos \left (d x + c\right )^{2} + 4 \, A a + 6 \, B b + 3 \, {\left (B a + A b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
\[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\int \left (A + B \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.94 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b - 12 \, B b \sin \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (76) = 152\).
Time = 0.29 (sec) , antiderivative size = 180, normalized size of antiderivative = 2.14 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (B a + A b\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 14.81 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.00 \[ \int \cos ^3(c+d x) (a+b \sec (c+d x)) (A+B \sec (c+d x)) \, dx=\frac {A\,b\,x}{2}+\frac {B\,a\,x}{2}+\frac {3\,A\,a\,\sin \left (c+d\,x\right )}{4\,d}+\frac {B\,b\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {A\,b\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {B\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
[In]
[Out]